/**
 * 
 */
package com.gite.nouette.admin.implementation.application;

import com.gite.nouette.admin.contract.application.IApplication;
import com.gite.nouette.admin.contract.application.init.IInitializer;
import com.gite.nouette.admin.contract.controller.IController;
import com.gite.nouette.admin.contract.view.IView;
import com.gite.nouette.admin.implementation.application.init.InitializerImpl;

/**
 * @author Cyril
 * 
 */
public class ApplicationImpl implements IApplication {
	private IInitializer initializer;

	public ApplicationImpl() {
		init();
	}

	public IInitializer getInitializer() {
		return this.initializer;
	}

	public void setInitializer(IInitializer initializer) {
		this.initializer = initializer;
	}

	@Override
	public IController<?, ?> getMainController() {
		return getInitializer().getMainController();
	}

	@Override
	public IView<?> getMainView() {
		return getMainController().getV();
	}

	private void init() {
		setInitializer(new InitializerImpl());
	}
}
